package com.cskaoyan.bean.wx_coupon;

import com.cskaoyan.bean.promotion.coupon.Coupon;
import com.cskaoyan.util.DateUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description:
 * @Author: WD created on 2021-09-20 22:36
 * @Version:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WXSelectInnerCoupon {

    private Integer id;
    private Integer cid;
    private String name;
    private String desc;
    private String tag;
    private Double min;
    private Double discount;
    private String startTime;
    private String endTime;
    private Boolean available;


    public WXSelectInnerCoupon(Coupon coupon,Integer id, Boolean available) {
            this.id = id;
            this.cid = coupon.getId();
            this.name =coupon.getName();
            this.desc = coupon.getDesc();
            this.tag = coupon.getTag();
            this.min = coupon.getMin();
            this.discount = coupon.getDiscount();
            this.startTime =DateUtils.dateFormat(coupon.getStartTime());
            this.endTime = DateUtils.dateFormat(coupon.getEndTime());
            this.available = available;

    }
}
